﻿using System;
using System.Data;
using System.Collections;
using CE.Database;

/// <summary>
/// Summary description for TAMoreDetailRsaDB
/// </summary>
/// 
namespace CE.TravelInsurance
{
    public class TAMoreDetailRsaDB
    {
        public TAMoreDetailRsaDB()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public Int64 Insert(TAMoreDetailRsa tamoredetailrsa)
        {
            MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocTAMoreDetailInsertUpdateSingleItemRsa]";

            SortedList _sPara = new SortedList();

            #region Parameter
            _sPara.Add("@CETAMoreDetailId", tamoredetailrsa.cetaMoreDetailId);
            _sPara.Add("@CETAInsId", tamoredetailrsa.cetaInsId);
            _sPara.Add("@CETAID", tamoredetailrsa.cetaId);
            _sPara.Add("@ProviderCompanyId", tamoredetailrsa.ProviderCompanyId);
            _sPara.Add("@Name", tamoredetailrsa.Name);
            _sPara.Add("@PostalCode", tamoredetailrsa.PostalCode);
            _sPara.Add("@UnitNo", tamoredetailrsa.UnitNo);
            _sPara.Add("@HomeNo", tamoredetailrsa.HomeNo);
            _sPara.Add("@Address", tamoredetailrsa.Address);
            _sPara.Add("@NRICNo", tamoredetailrsa.NRICNo);
            _sPara.Add("@Nationality", tamoredetailrsa.Nationality);
            _sPara.Add("@MobileNo", tamoredetailrsa.MobileNo);
            _sPara.Add("@HomePhoneNo", tamoredetailrsa.HomePhoneNo);
            _sPara.Add("@OfficePhoneNo", tamoredetailrsa.OfficePhoneNo);
            _sPara.Add("@FaxNo", tamoredetailrsa.FaxNo);
            _sPara.Add("@Gender", tamoredetailrsa.Gender);
            _sPara.Add("@DOB", tamoredetailrsa.DOB);
            _sPara.Add("@Occupation", tamoredetailrsa.Occupation);
            _sPara.Add("@EmpName", tamoredetailrsa.EmpName);
            _sPara.Add("@PlanName", tamoredetailrsa.PlanName);
            _sPara.Add("@PlanType", tamoredetailrsa.PlanType);
            _sPara.Add("@TripType", tamoredetailrsa.TripType);
            _sPara.Add("@CoverageLevel", tamoredetailrsa.CoverageLevel);
            _sPara.Add("@Country", tamoredetailrsa.Country);
            _sPara.Add("@Area", tamoredetailrsa.Area);
            _sPara.Add("@Duration", tamoredetailrsa.Duration);
            _sPara.Add("@StartDate", tamoredetailrsa.StartDate);
            _sPara.Add("@EndDate", tamoredetailrsa.EndDate);
            _sPara.Add("@ChildAge", tamoredetailrsa.ChildAge);
            _sPara.Add("@AdultAge", tamoredetailrsa.AdultAge);
            _sPara.Add("@NoOfTraveller", tamoredetailrsa.NoOfTraveller);
            _sPara.Add("@TotalPremium", tamoredetailrsa.TotalPremium);
            _sPara.Add("@PamentType", tamoredetailrsa.PamentType);           
            _sPara.Add("@RefCEUserId", tamoredetailrsa.RefCEUserId);
            _sPara.Add("@ViewedDetailId", tamoredetailrsa.ViewedDetailId);
            _sPara.Add("@Status", tamoredetailrsa.Status);
            _sPara.Add("@Info1", tamoredetailrsa.Info1);
            _sPara.Add("@Info2", tamoredetailrsa.Info2);
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
        }

        public bool Update()
        {
            return true;
        }

        public bool Delete()
        {
            return true;
        }
    }
}
